package com.alawn.web.security.model;

import com.alawn.framework.core.web.faces.utils.FacesContextUtils;
import com.alawn.framework.core.web.model.PageModel;
import com.alawn.framework.services.security.User;
import com.alawn.security.mapper.UserMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

public class UserDataModel extends PageModel<User> {

    private static final long serialVersionUID = 7762662892177512008L;


    private UserDataModel() {
    }

    private static class InnerAccountDataModel {
        private static final UserDataModel dataModel = new UserDataModel();
    }

    public static UserDataModel getInstance() {
        return InnerAccountDataModel.dataModel;
    }

    @Override
    public BaseMapper<User> getEntityMapper() {
        return FacesContextUtils.getBean(UserMapper.class);
    }
}
